﻿using System.Windows;
using Microsoft.Phone.Controls;

namespace PhoneApp1
{
    public partial class SettingsManagerPage : PhoneApplicationPage
    {
        Settings settings = null;
        public SettingsManagerPage()
        {
            InitializeComponent();
            settings = new Settings();
        }

        private void btnSetBool_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            settings.SomeBoolean = true;
        }

        private void btnSetString_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            settings.SomeString = "WOW!";
        }

        private void btnSetInt_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            settings.SomeNumber = 55;
        }

        private void btnGetBool_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            MessageBox.Show(settings.SomeBoolean.ToString());
        }

        private void btnGetString_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            MessageBox.Show(settings.SomeString);
        }

        private void btnGetInt_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            MessageBox.Show(settings.SomeNumber.ToString());
        }
    }
}